MAPS
Photo by Sanjoy Saha on Unsplash
Mr. Watson—Come here—I want to see you…
— Alexander Graham Bell, first words spoken on a telephone
landline <- read.csv("archetypes/phone-subscriptions/landline-usage.csv", header = TRUE)
landline
mobile <- read.csv("archetypes/phone-subscriptions/mobile-phone-usage.csv", header = TRUE)
mobile
phones <- landline %>%
select(entity, year, landline_subs) %>%
left_join(mobile) %>%
mutate(decade = year %/% 10 * 10) %>%
group_by(entity, decade) %>%
mutate(
median_landline_subs = median(landline_subs, na.rm = TRUE),
median_mobile_subs = median(mobile_subs, na.rm = TRUE)
) %>%
ungroup() %>%
distinct(entity, code, decade, median_landline_subs, median_mobile_subs) %>%
group_by(entity) %>%
fill(code) %>%
ungroup() %>%
group_by(entity, decade) %>%
mutate(
most = if_else(median_landline_subs > median_mobile_subs, "landline", "smartphone"),
img = if_else(!is.na(most), paste0("archetypes/phone-subscriptions/", most, ".png"), NULL)
) %>%
ungroup() %>%
left_join(world_countries_grid1, by = c("entity" = "name"))
phones
theme_opts <- theme(
text = element_text(family = "inconsolata"),
plot.title = element_text(color = "black", size = 14, face = "bold", family = "inconsolata"),
plot.subtitle = element_text(color = "black", size = 12, family = "inconsolata"),
plot.caption = element_text(color = "#555555", size = 8, family = "inconsolata"),
plot.margin = margin(10, 10, 10, 10),
plot.background = element_rect(fill = "grey97", color = NA)
)
v1 <- ggplot(phones) +
geom_image(aes(col, -row - decade * 2.5, image = img), size = 0.014, asp = 0.8) +
geom_text(aes(-8, -10 - decade * 2.5, label = paste0("'", str_sub(decade, -2, -1), "s")), size = 10, stat = "unique", family = "inconsolata", color = "black", alpha = 0.8) +
labs(
title = toupper("The fall of landline"),
subtitle = "Indicating majority share of phone subscriptions (landline or mobile)\nas median values by country and decade"
) +
coord_cartesian(clip = "off") +
xlim(-14, 34) +
theme_void() +
theme_opts
girafe(ggobj = v1, width_svg = 12, height_svg = 16,
options = list(opts_sizing(rescale = TRUE, width = 0.8)))